//
//  UIImage+Resize.m
//  YiJuZhangShou2.0
//
//  Created by URANUS on 16/4/20.
//  Copyright © 2016年 Mr.X. All rights reserved.
//

#import "UIImage+Resize.h"

@implementation UIImage (Resize)

- (UIImage *)resizeImageWithSize:(CGSize)size{
    UIGraphicsBeginImageContext(size);
    CGRect imageRect = CGRectMake(0.0, 0.0, size.width, size.height);
    [self drawInRect:imageRect];
    UIImage *image;
    image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    return image;
}

@end
